package utils3D 
{
	import flash.geom.Vector3D;
	/**
	 * ...
	 * @author Dmitriy Gaiduk
	 */
	public class Converter 
	{
		
		public function Converter() 
		{
			
		}
		
		static public function convertPoints(points:Vector.<Vector3D>):Vector.<Number> {
			var pointsXYZ:Vector.<Number> = new Vector.<Number>();
			for (var i:int ; i < points.length; i++ ) {
				pointsXYZ.push(points[i].x);
				pointsXYZ.push(points[i].y);
				pointsXYZ.push(points[i].z);
			}
			return pointsXYZ;
		}
		
		static public function convertUVT(uvt:Vector.<Number>, indeces:Vector.<int>):Vector.<Number> {
			var uvs:Vector.<Number> = new Vector.<Number>();
			var k:int = 0;
			while (k < uvt.length) {
				uvs.push(uvt[k]);
				uvs.push(uvt[k + 1]);
				k += 3;
			}
			return uvs;
		
		}
		
	}

}